package factory;

import entity.CreditCard;
import entity.VisaCC;
/**
 * 弃用
 */
@Deprecated
public class VisaFactory implements CreditCardFactory{
    private static VisaFactory instance = null;
    private VisaFactory() {
    }
    public static VisaFactory getInstance() {
        if (instance == null) {
            instance = new VisaFactory();
        }
        return instance;
    }
    @Override
    public CreditCard createCard(String cardNumber, String holderName) {
        return new VisaCC()
                .setNumber(cardNumber)
                .setHolderName(holderName)
                .build();
    }
}
